package com.lingshi.shopping_category_customer_api.controller;


import com.lingshi.shopping.result.BaseResult;
import com.lingshi.shopping.service.CategoryService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户端广告
 */
@RestController
@RequestMapping("/user/category")
public class CategoryController {

    @DubboReference
    private CategoryService categoryService;

    /**
     * 查询所有广告
     * @return
     */
    @GetMapping("/all")
    public BaseResult findAll() {
        return BaseResult.success(categoryService.findAll());
    }
}
